// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CatalogCategoryProductIndex generated by hbm2java
 */
@Entity
@Table(name = "catalog_category_product_index", catalog = "magento")
public class CatalogCategoryProductIndex implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private CatalogCategoryProductIndexId id;
	private CatalogCategoryEntity catalogCategoryEntity;
	private CoreStore coreStore;
	private CatalogProductEntity catalogProductEntity;
	private Integer position;
	private short isParent;
	private short visibility;

	public CatalogCategoryProductIndex() {
	}

	public CatalogCategoryProductIndex(CatalogCategoryProductIndexId id,
			CatalogCategoryEntity catalogCategoryEntity, CoreStore coreStore,
			CatalogProductEntity catalogProductEntity, short isParent,
			short visibility) {
		this.id = id;
		this.catalogCategoryEntity = catalogCategoryEntity;
		this.coreStore = coreStore;
		this.catalogProductEntity = catalogProductEntity;
		this.isParent = isParent;
		this.visibility = visibility;
	}

	public CatalogCategoryProductIndex(CatalogCategoryProductIndexId id,
			CatalogCategoryEntity catalogCategoryEntity, CoreStore coreStore,
			CatalogProductEntity catalogProductEntity, Integer position,
			short isParent, short visibility) {
		this.id = id;
		this.catalogCategoryEntity = catalogCategoryEntity;
		this.coreStore = coreStore;
		this.catalogProductEntity = catalogProductEntity;
		this.position = position;
		this.isParent = isParent;
		this.visibility = visibility;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "categoryId", column = @Column(name = "category_id", nullable = false)),
			@AttributeOverride(name = "productId", column = @Column(name = "product_id", nullable = false)),
			@AttributeOverride(name = "storeId", column = @Column(name = "store_id", nullable = false)) })
	public CatalogCategoryProductIndexId getId() {
		return this.id;
	}

	public void setId(CatalogCategoryProductIndexId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "category_id", nullable = false, insertable = false, updatable = false)
	public CatalogCategoryEntity getCatalogCategoryEntity() {
		return this.catalogCategoryEntity;
	}

	public void setCatalogCategoryEntity(
			CatalogCategoryEntity catalogCategoryEntity) {
		this.catalogCategoryEntity = catalogCategoryEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false, insertable = false, updatable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false, insertable = false, updatable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "position")
	public Integer getPosition() {
		return this.position;
	}

	public void setPosition(Integer position) {
		this.position = position;
	}

	@Column(name = "is_parent", nullable = false)
	public short getIsParent() {
		return this.isParent;
	}

	public void setIsParent(short isParent) {
		this.isParent = isParent;
	}

	@Column(name = "visibility", nullable = false)
	public short getVisibility() {
		return this.visibility;
	}

	public void setVisibility(short visibility) {
		this.visibility = visibility;
	}

}
